<% layout('/layouts/default.html', {title: '专项模拟考试表管理', libs: ['dataGrid']}){ %>
<div class="main-content">
	<div class="box box-main">
		<div class="box-header">
			<div class="box-title">
				<i class="fa icon-notebook"></i> ${text('专项模拟考试表管理')}
			</div>
			<div class="box-tools pull-right">
				<a href="#" class="btn btn-default" id="btnSearch" title="${text('查询')}"><i class="fa fa-filter"></i> ${text('查询')}</a>
				<% if(hasPermi('zx:examination:texamination:edit')){ %>
					<a href="${ctx}/zx/examination/texamination/form" class="btn btn-default btnTool" title="${text('新增专项模拟考试表')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
				<% } %>
			</div>
		</div>
		<div class="box-body">
			<#form:form id="searchForm" model="${texamination}" action="${ctx}/zx/examination/texamination/listData" method="post" class="form-inline hide"
					data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
				<div class="form-group">
					<label class="control-label">${text('数据名称')}：</label>
					<div class="control-inline">
						<#form:input path="objName" maxlength="255" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('数据类型')}：</label>
					<div class="control-inline">
						<#form:input path="objType" maxlength="10" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('报名开始时间')}：</label>
					<div class="control-inline">
						<#form:input path="signupStartTime" readonly="true" maxlength="20" class="form-control Wdate-datetime"
							dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('报名结束时间')}：</label>
					<div class="control-inline">
						<#form:input path="signupEndTime" readonly="true" maxlength="20" class="form-control Wdate-datetime"
							dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('考场1')}：</label>
					<div class="control-inline">
						<#form:input path="room1" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('考场1考试开始时间')}：</label>
					<div class="control-inline">
						<#form:input path="startDate1" readonly="true" maxlength="20" class="form-control Wdate-datetime"
							dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('考场1考试结束时间')}：</label>
					<div class="control-inline">
						<#form:input path="endDate1" readonly="true" maxlength="20" class="form-control Wdate-datetime"
							dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('考场2')}：</label>
					<div class="control-inline">
						<#form:input path="room2" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('考场2考试开始时间')}：</label>
					<div class="control-inline">
						<#form:input path="startDate2" readonly="true" maxlength="20" class="form-control Wdate-datetime"
							dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('考场2考试结束时间')}：</label>
					<div class="control-inline">
						<#form:input path="endDate2" readonly="true" maxlength="20" class="form-control Wdate-datetime"
							dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('考场3')}：</label>
					<div class="control-inline">
						<#form:input path="room3" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('考场3考试开始时间')}：</label>
					<div class="control-inline">
						<#form:input path="startDate3" readonly="true" maxlength="20" class="form-control Wdate-datetime"
							dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('考场3考试结束时间')}：</label>
					<div class="control-inline">
						<#form:input path="endDate3" readonly="true" maxlength="20" class="form-control Wdate-datetime"
							dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('考场4')}：</label>
					<div class="control-inline">
						<#form:input path="room4" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('考场4考试开始时间')}：</label>
					<div class="control-inline">
						<#form:input path="startDate4" readonly="true" maxlength="20" class="form-control Wdate-datetime"
							dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('考场4考试结束时间')}：</label>
					<div class="control-inline">
						<#form:input path="endDate4" readonly="true" maxlength="20" class="form-control Wdate-datetime"
							dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('考场5')}：</label>
					<div class="control-inline">
						<#form:input path="room5" maxlength="50" class="form-control width-120"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('考场5考试开始时间')}：</label>
					<div class="control-inline">
						<#form:input path="startDate5" readonly="true" maxlength="20" class="form-control Wdate-datetime"
							dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
					</div>
				</div>
				<div class="form-group">
					<label class="control-label">${text('考场5考试结束时间')}：</label>
					<div class="control-inline">
						<#form:input path="endDate5" readonly="true" maxlength="20" class="form-control Wdate-datetime"
							dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
					</div>
				</div>
				<div class="form-group">
					<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
					<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
				</div>
			</#form:form>
			<table id="dataGrid"></table>
			<div id="dataGridPage"></div>
		</div>
	</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
	searchForm: $("#searchForm"),
	columnModel: [
		{header:'${text("数据名称")}', name:'objName', index:'a.obj_name', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
			return '<a href="${ctx}/zx/examination/texamination/form?id='+row.id+'" class="btnList" data-title="${text("编辑专项模拟考试表")}">'+(val||row.id)+'</a>';
		}},
		{header:'${text("数据类型")}', name:'objType', index:'a.obj_type', width:150, align:"center", formatter: function(val, obj, row, act){
			var vale=js.getDictLabel(${@DictUtils.getDictListJson('t_examination_category')}, val, '${text("")}', true);
			var url='<a href="${ctx}/zx/examination/barbecue/texaminationBarbecue/list?examId='+row.id+'&category='+val+'" class="btnList" data-title="${text("编辑考试试卷")}">'+vale+'</a>'
			return  url;
		}},
		{header:'${text("报名开始时间")}', name:'signupStartTime', index:'a.signup_start_time', width:150, align:"center"},
		{header:'${text("报名结束时间")}', name:'signupEndTime', index:'a.signup_end_time', width:150, align:"center"},
		{header:'${text("考场1")}', hidden:true, name:'room1', index:'a.room1', width:150, align:"left", formatter: function(val, obj, row, act){
			var url='<a href="${ctx}/zx/examination/vip/texaminationVip/list?examId='+row.id+'&room='+val+'" class="btnList" data-title="${text("编辑专项模拟考试表")}">'+val+'</a>'
			return  url;
		}},
		{header:'${text("考场1考试开始时间")}', hidden:true, name:'startDate1', index:'a.start_date1', width:150, align:"center"},
		{header:'${text("考场1考试结束时间")}', hidden:true,name:'endDate1', index:'a.end_date1', width:150, align:"center"},
		{header:'${text("考场2")}', hidden:true,name:'room2', index:'a.room2', width:150, align:"left", formatter: function(val, obj, row, act){
			var url='<a href="${ctx}/zx/examination/vip/texaminationVip/list?examId='+row.id+'&room='+val+'" class="btnList" data-title="${text("编辑专项模拟考试表")}">'+val+'</a>'
			return  url;
		}},
		{header:'${text("考场2考试开始时间")}', hidden:true,name:'startDate2', index:'a.start_date2', width:150, align:"center"},
		{header:'${text("考场2考试结束时间")}', hidden:true,name:'endDate2', index:'a.end_date2', width:150, align:"center"},
		
		{header:'${text("考场3考试开始时间")}', hidden:true,name:'startDate3', index:'a.start_date3', width:150, align:"center"},
		{header:'${text("考场3考试结束时间")}', hidden:true,name:'endDate3', index:'a.end_date3', width:150, align:"center"},
		{header:'${text("考场4")}',hidden:true, name:'room4', index:'a.room4', width:150, align:"left", formatter: function(val, obj, row, act){
			var url='<a href="${ctx}/zx/examination/vip/texaminationVip/list?examId='+row.id+'&room='+val+'" class="btnList" data-title="${text("编辑专项模拟考试表")}">'+val+'</a>'
			return  url;
		}},
		{header:'${text("考场4考试开始时间")}', hidden:true,name:'startDate4', index:'a.start_date4', width:150, align:"center"},
		{header:'${text("考场4考试结束时间")}', hidden:true,name:'endDate4', index:'a.end_date4', width:150, align:"center"},
		{header:'${text("考场5")}',hidden:true, name:'room5', index:'a.room5', width:150, align:"left", formatter: function(val, obj, row, act){
			var url='<a href="${ctx}/zx/examination/vip/texaminationVip/list?examId='+row.id+'&room='+val+'" class="btnList" data-title="${text("编辑专项模拟考试表")}">'+val+'</a>'
			return  url;
		}},
		{header:'${text("考场5考试开始时间")}', hidden:true,name:'startDate5', index:'a.start_date5', width:150, align:"center"},
		{header:'${text("考场5考试结束时间")}', hidden:true,name:'endDate5', index:'a.end_date5', width:150, align:"center"},
		{header:'${text("考场")}', name:'room',  width:150, align:"left", formatter: function(val, obj, row, act){
			var url='<a href="${ctx}/zx/examination/room/texaminationRoom/list?examId='+row.id+'" class="btnList" data-title="${text("编辑专项模拟考试表")}">考场</a>'
			return  url;
		}},
		{header:'${text("操作")}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
			var actions = [];
			<% if(hasPermi('zx:examination:texamination:edit')){ %>
				actions.push('<a href="${ctx}/zx/examination/texamination/form?id='+row.id+'" class="btnList" title="${text("编辑专项模拟考试表")}"><i class="fa fa-pencil"></i></a>&nbsp;');
				if (row.status == Global.STATUS_NORMAL){
					actions.push('<a href="${ctx}/zx/examination/texamination/disable?id='+row.id+'" class="btnList" title="${text("停用专项模拟考试表")}" data-confirm="${text("确认要停用该专项模拟考试表吗？")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
				} else if (row.status == Global.STATUS_DISABLE){
					actions.push('<a href="${ctx}/zx/examination/texamination/enable?id='+row.id+'" class="btnList" title="${text("启用专项模拟考试表")}" data-confirm="${text("确认要启用该专项模拟考试表吗？")}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
				}
				actions.push('<a href="${ctx}/zx/examination/texamination/delete?id='+row.id+'" class="btnList" title="${text("删除专项模拟考试表")}" data-confirm="${text("确认要删除该专项模拟考试表吗？")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
			<% } %>
			return actions.join('');
		}}
	],
	// 加载成功后执行事件
	ajaxSuccess: function(data){
		
	}
});
</script>